From 2dbaca2464f9baf402a9ac165b78c19e2015dad9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 30 Oct 2020 14:59:08 -0400 Subject: [PATCH] constraintlayout: Make sure guides get their constraints When using GtkBuilder to create constraints and guides, the layout manager is already rooted when the guides get created, and we were forgetting to create the guides constraints in this case. Fix it by adding a call to gtk_constraint_guide_update(). This was showing up in the new builder-based constraints demo as the guide not having the expected effect. --- gtk/gtkconstraintlayout.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkconstraintlayout.c b/gtk/gtkconstraintlayout.c index 86ae56ce06..e5d6037962 100644 --- a/gtk/gtkconstraintlayout.c +++ b/gtk/gtkconstraintlayout.c @@ -1867,7 +1867,10 @@ gtk_constraint_layout_add_guide (GtkConstraintLayout *layout, if (layout->guides_observer) g_list_store_append (layout->guides_observer, guide); + gtk_constraint_guide_update (guide); + gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (layout)); + } /** -- 2.30.2